{include file="./headStart.tpl"}
{include file="./headEnd.tpl"}
<head>
<script type="text/javascript">
$(document).ready(function(){
  reportChange();
});
function deletechecked()
{
	var answer = confirm("Delete Selected Recored ?")
	if (answer)
	{
	  document.messages.submit();
	}
	return false;
}
function reportChange()
{
  	var dataString = "userId=" + $('#userId').val() + "&fromDateYear=" + $("select[name='fromDateYear']").val() 
                      + "&fromDateMonth=" + $("select[name='fromDateMonth']").val() + "&fromDateDay=" + $("select[name='fromDateDay']").val() 
                      + "&toDateYear=" + $("select[name='toDateYear']").val() 
                      + "&toDateMonth=" + $("select[name='toDateMonth']").val() + "&toDateDay=" + $("select[name='toDateDay']").val();
  	  $.ajax({
        url:  "./dailyReportListAj.php",
        cache: false,
        data: dataString,
        success: function(data){
        $("#userType").html(data);
      }
    });
}
function getFilterTextData()
{
  var textString = "txtSearch=" + $("#searchTxt").val();
  $.ajax({
    type: "GET",
    url:  "dailyReportSearchAj.php",
    data: textString,
    success: function(data){ 
      $("#userType").html(data);
    }
  });
}
</script>
</head>
<table border='0' cellpadding='1' cellspacing='2' align='center'>
<tr>
 <td class="table1" align="center" colspan="4"><font style="font-size: 16px"><b> Search :</b></font><input type="text" name="searchTxt" id="searchTxt">
    <input type="button" name="button" id="goButton" value=" G O... " class="button" onclick="getFilterTextData();" />
 </td>
</tr>
<tr>
  <td class="table1" align="center" colspan="26"><font style="font-size: 16px"><b> Daily Report List </b></font></td>
</tr>
</table>
<table border="" cellpadding="" cellspacing="" align='center'>
<br>
<tr>
  <td class="table2">User :                            
    <select name="userId" id="userId">           
      <option value="0">All</option>                   
      {html_options values=$userId output=$userName} 
    </select>                                          
  </td>
  <td align="right" class="table2" >Report Date : </td>
    <td NOWRAP class="table2">
      {html_select_date prefix="fromDate" time="$reportFromDate" start_year="-3" end_year="+1" month_format="%m" field_order="DMY"  day_value_format="%02d"}
    </td>
    <td align="right" class="table2" >To : </td>
    <td NOWRAP class="table2">
      {html_select_date prefix="toDate" time="$reportToDate" start_year="-3" end_year="+1" month_format="%m" field_order="DMY"  day_value_format="%02d"}
    </td>
    <td class="table2">
      <input type="submit" name="submitDateBtn" value="GO..." class="button" onclick="reportChange();"/>
    </td>
 </tr>  
</table>
<br />
<div id="userType"> 
</div>
</table>
{include file="footer.tpl"}
